<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>简化对象写法</title>
</head>
<script>
    //简化对象：ES6允许在{}里面，直接写入变量和函数，做为对象的属性和方法
    let name = '张涛'
    let change = function() {
        console.log('张涛要学习面试啦')
    }
    const PERSON = {
        name,
        change,
        improve: function(){
            console.log('张涛要提升Java')
        }
    }
    console.log(PERSON)
</script>
</html>